package com.fire.control.system.dto;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;
import java.util.List;

import com.fire.control.system.entity.Notice;

public class NoticeDTO implements Serializable {

	private static final long serialVersionUID = 1L;
	
	private String id;
	private Boolean status;
	private Date createTime;
	private String title;
	private String content;
	private Date sendTime;
	private String sendObject; // 发送对象
	private String sendGroup; //推送设备组
	private String companyName; 
	private String companyId;
	
	private String validTime;//消息有效时间
	
	private List<SelectGroupDTO> groups;
	private List<SelectRoleDTO> roles;
	
	
	
	public String getCompanyId() {
		return companyId;
	}
	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}
	public String getValidTime() {
		return validTime;
	}
	public void setValidTime(String validTime) {
		this.validTime = validTime;
	}
	public List<SelectGroupDTO> getGroups() {
		return groups;
	}
	public void setGroups(List<SelectGroupDTO> groups) {
		this.groups = groups;
	}
	public List<SelectRoleDTO> getRoles() {
		return roles;
	}
	public void setRoles(List<SelectRoleDTO> roles) {
		this.roles = roles;
	}
	public String getSendGroup() {
		return sendGroup;
	}
	public void setSendGroup(String sendGroup) {
		this.sendGroup = sendGroup;
	}
	public String getCompanyName() {
		return companyName;
	}
	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public Boolean getStatus() {
		return status;
	}
	public void setStatus(Boolean status) {
		this.status = status;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Date getSendTime() {
		return sendTime;
	}
	public void setSendTime(Date sendTime) {
		this.sendTime = sendTime;
	}
	public String getSendObject() {
		return sendObject;
	}
	public void setSendObject(String sendObject) {
		this.sendObject = sendObject;
	}
	
	public NoticeDTO set(Notice notice) {
		if(notice != null) {
			this.id = notice.getId();
			this.status = notice.getStatus();
			this.createTime = notice.getCreateTime();
			this.title = notice.getTitle();
			this.content = notice.getContent();
//			this.sendObject = notice.getSendObject();
			this.sendTime = notice.getSendTime();
			return this;
		}
		return null;
	}
	
}